Back to Article
Article Notebook
Download Source

Classifying drug-induced webs using using Topological Data Analysis

Authors
Affiliation

Guilherme Vituri F. Pinto

Unesp

Telmo

??????

Published

May 27, 2025

Abstract

We studied etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc etc

Keywords

Topological Data Analysis, Persistent homology

1 Analysis

1.1 Loading the images

In [1]:
using TDAweb, TDAweb.Preprocessing, TDAweb.Analysis, TDAweb.TDA
using TidierFiles: list_files;
using DataFrames
using Images: mosaicview;
using Plots: heatmap, plot
In [1]:
files = list_files("images")
species = map(files) do file
  split(file, "/")[2]
end
imgs = load_web.(files, blur = 2)
As = image_to_array.(imgs)
Xs = image_to_r2.(As, threshold = 0.1);
In [1]:
df = DataFrame(File = files, Specie = species, Image = imgs);
grps = groupby(df, :Specie) |> collect;
In [1]:
# for d ∈ groupby(df, :Specie)
#   print("### $(d.Specie[1]) \n")
#   mosaicview(d.Image, ncol = 3) |> display
# end;
for i  [1, 6]
  plot(
    heatmap(As[i]),
    plot_scatter(Xs[i])
  ) |> display
end;